<template>
	<view style="background: #F7F7F7;height: 100vh;">
		<z-paging ref="paging" class="device-list" v-model="logs" @query="getLogs" default-page-size="10">
			<view class="list">
				<view class="list-item" v-for="log in logs" :key="log.id">
					<view class="item-box">
						<view class="name">提现{{ log.status=='created'?'申请中':log.status=='successed'?'成功':'已拒绝'}}
						</view>
						<view class="time">{{ log.createtime }}</view>
					</view>
					<view style="display: flex;align-items: center;justify-content: space-between;margin-top: 10rpx;">
						<view> 提现金额:<text class="money">{{ log.money }}元</text></view>
						<view> 手续费:<text class="money">{{ log.handingfee }}元</text></view>
					</view>
					<view style="margin-top: 10rpx;">支付宝:{{log.name}}-{{log.account}}</view>
				</view>
			</view>
		</z-paging>
	</view>
</template>

<script>
	import api from '@/api/index2.js';
	export default {
		data() {
			return {
				logs: []
			};
		},
		methods: {
			getLogs(pageNo, pageSize) {
				api.withdrawlog({
					page: pageNo,
					limit: pageSize
				}).then(res => {
					this.$refs.paging.complete(res.data.data);
				}).catch(res => {
					this.$refs.paging.complete(false);
				})
			},
		}
	};
</script>

<style lang="scss" scoped>
	.list {
		padding-top: 10px;

		.list-item {
			background: #ffffff;
			box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(41, 121, 255, 0.05);
			border-radius: 16rpx;
			border: 2rpx solid;
			border-image: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1)) 1 1;
			margin: 0rpx 34rpx 20rpx;
			padding: 26rpx 30rpx;

			.item-box {
				display: flex;
				align-items: center;
				justify-content: space-between;
			}

			.name {
				font-size: 28rpx;
				color: #413100;
				line-height: 40rpx;
			}

			.money {
				font-size: 32rpx;
				color: #f95452;
				font-weight: bold;
				line-height: 44rpx;
			}

			.time {
				font-size: 24rpx;
				color: #666666;
				line-height: 34rpx;
			}


		}
	}
</style>